class Solution {
public:
    bool isUnique(string astr)
    {

        int ret = 0;
        for (int i = 0; i < astr.size(); i++)
        {
            if ((ret & (1 << astr[i] - 'a'))) return false;
            else ret |= 1 << astr[i] - 'a';
        }

        return true;

    }
};